//1. Number
let a: number = 10;
//2. String 类型
let str: string = 'abc';
//3. Boolean
let isDone: boolean = true;
// 4.Array
let arr: object[] = [{a: 1}, {a: 2}];
let arr2: string[] = ['a', 'b'];
// let arr = ['123', 12, true];

// const sym = Symbol();

// let obj = {
//   [sym]: 'semlinker'
// };
// console.log(obj[sym]);

console.log(arr2);


function greet(person: string) {

}

//枚举 : 星期 一 日 C# java
//enum  关键字 : 声明一个枚举类型的数据
enum Week {//月 动物的种类  处理错误的时候 可以把错误类型 设置成枚举
  ONE,
  TWO,
  THREE,
  FOUR,
  FIVE,
  SIX,
  SEVEEN
}

console.log(Week.ONE);
console.log(Week.TWO);
console.log(Week.THREE);
// 对象

Object.keys(Week).map(item => console.log(item));


// any ts就失去了意义
let abc: any = 123;
let abc2: any = '123';


//unknown : 不知道
let value: unknown;
value = '123';
value = 123;
value = true;

let value2: any = value;

// unknow 类型只能被赋值给any和unknow本身
// let value3: boolean = value;// 报错

let nul: null;
let und: undefined;

nul = null;
und = undefined;


